<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../share/taglib.jsp" %>
<html>
<head>
<title><bean:message key="display.${buildingForm.method eq 'edit' ? 'edit' : 'add' }"/><bean:message key="info.building.name"/></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<%@ include file="/sks/cms/page/share/validate.inc" %>
<%@ include file="/sks/js/datePicker.inc" %>
<script type="text/javascript" src="/js/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="/js/jscripts/tiny_mce/button_style/default.js"></script>
<script type="text/javascript" src="/js/jscripts/tiny_mce/button_style/simple.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init(getDefaultButtonStyle("advantage"));
$(function() {
	$( "#occupancyDate" ).datepicker({
		changeMonth: true,
		changeYear: true
	});
	$( "#sellDate" ).datepicker({
		changeMonth: true,
		changeYear: true
	});
});
function bodyOnLoad() {
	new tt.DV().set("yyyy-mm-dd").add("sellDate", "occupancyDate");
	new tt.LV().set(0, 512).add("sellAddress");
	new tt.LV().set(0, 40).add("sellTel", "fax");
	${buildingForm.method eq 'edit' ? 'tt.validate();' : ''}
}
</script>
</head>
<body onload="bodyOnLoad();" bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<html:form styleId="buildingForm" action="/cms/house/building.do" method="post" onsubmit="return tt.validate();">
<html:hidden property="buildingId"/>
<html:hidden property="name"/>
<html:hidden property="status"/>
<html:hidden property="publishTime"/>
<html:hidden property="type"/>
<input type="hidden" name="method" value="${buildingForm.method}">
  <table width="90%" border="0" cellspacing="2" cellpadding="3" align="center">
    <tr bgcolor="#ffbe26">
    	<td colspan="2">
    		<%@ include file="buildingMenu.inc"%>
    	</td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="20%"><div align="right"><bean:message key="info.building.name"/>：</div></td>
      <td width="80%" valign="middle">${buildingForm.name}</td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">售楼地址：</div></td>
      <td valign="middle"><html:text disabled="<%=isReadOnly%>" property="sellAddress" size="50"/>
        <html:errors property="sellAddress"/>
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">售楼电话：</div></td>
      <td valign="middle"><html:text disabled="<%=isReadOnly%>" property="sellTel" size="50"/>
        <html:errors property="sellTel"/>
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">传真：</div></td>
      <td valign="middle"><html:text disabled="<%=isReadOnly%>" property="fax" size="50"/>
        <html:errors property="fax"/>
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">销售日期：</div></td>
      <td valign="middle">
      	<input name="sellDate" id="sellDate" <%=isReadOnly?"disabled=\"disabled\"":""%>
              value="<fmt:formatDate value='${buildingForm.sellDate}' pattern='yyyy-MM-dd' />" />
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">销售进度：</div></td>
      <td valign="middle"><html:text disabled="<%=isReadOnly%>" property="sellSchedule" size="50"/>
        <html:errors property="sellSchedule"/>
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">最早可入住日期：</div></td>
      <td valign="middle">
      	<input name="occupancyDate" id="occupancyDate" <%=isReadOnly?"disabled=\"disabled\"":""%>
              value="<fmt:formatDate value='${buildingForm.occupancyDate}' pattern='yyyy-MM-dd' />" />
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td><div align="right">楼盘优势：</div></td>
      <td>
      <% if (!isReadOnly) { %>
      <html:textarea property="advantage" styleId="advantage"></html:textarea>
      <% } else { %>
      ${buildingForm.advantage}
      <% } %>
      </td>
    </tr>
    <tr bgcolor="f5f5f5">
      <td colspan="2"> <div align="center"> 
          <button <%=isReadOnly?"disabled=\"disabled\"":""%> type="submit" class="frm_btn"><bean:message key="display.save"/></button>
        </div></td>
    </tr>
  </table>
</html:form>
<br>
</body>
</html>